package ws.very.util.play2

import play.api.libs.iteratee.Iteratee
import scala.concurrent.ExecutionContext

object Iteratees {

  def eachWithEx[E](f: E => Unit)(exFn: (E, Throwable) => Unit)(implicit ec: ExecutionContext): Iteratee[E, Unit] =
    Iteratee.foreach { f.withEx { exFn } }

}